package org.ytor.common.util.jvm;

import lombok.Data;

import java.lang.management.MemoryUsage;

@Data
public class MemoryInfo {
    private long init;
    private long used;
    private long committed;
    private long max;

    public MemoryInfo(MemoryUsage usage) {
        this.init = usage.getInit();
        this.used = usage.getUsed();
        this.committed = usage.getCommitted();
        this.max = usage.getMax();
    }

}
